#define TRUE 1
#define FALSE 0
#define NULL 0

typedef unsigned long       DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef float               FLOAT;
typedef short SHORT;
typedef unsigned int   size_t;

void *ucmemset(unsigned char *s, int c, size_t n)
{
    unsigned char* p=s;
    while(n--)
        *p++ = (unsigned char)c;
    return s;
}

void *imemset(int *s, int c, size_t n)
{
    int* p=s;
    while(n--)
        *p++ = (unsigned char)c;
    return s;
}
void *cmemset(char *s, int c, size_t n)
{
    char* p=s;
    while(n--)
        *p++ = (unsigned char)c;
    return s;
}

void *memcpy(BYTE *dest, const BYTE *src, size_t n)
{
    BYTE *dp = dest;
    const BYTE *sp = src;
    while (n--)
        *dp++ = *sp++;
    return dest;
}